package com.cicd.demo.controller;


import com.alibaba.fastjson.JSON;
import com.cicd.demo.bean.OperBlackListVO;
import com.fasterxml.jackson.databind.deser.std.StringArrayDeserializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(value = "Swagger2 在线接口文档")
public class IndexController {



    @RequestMapping(value = "cicd",method = RequestMethod.GET)
    @ApiOperation(value = "显示测试")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "随机id", required = true, dataTypeClass = String.class, paramType = "query")
    })
    public String index(@RequestParam(value = "id") String id){
        return "你好！   2021.1.6  "+id;
    }

    @RequestMapping(value = "/TEST",method = RequestMethod.POST)
    public String test(@RequestBody OperBlackListVO operBlackListVO){
//        OperBlackListVO operBlackListVO1 = JSON.parseObject(operBlackListVO.toString(), OperBlackListVO.class);
        System.out.println(operBlackListVO);
        return "111";
    }
}
